home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™94 / Talks & Papers / Michael D. Crawford↵ / Word Services SDK 1.0.5 / Writeswell Jr. Source / ObNull.c < prev    next >
Text File  |  1992-04-23  |  2KB  |  51 lines

  1. /* ObNull.c
  2.  * Handle "parameter-less" apple events
  3.  * ©1992 Working Software, Inc.
  4.  * This source code is copyrighted.  Permission is granted to use the Word Services
  5.  * portion of the Writeswell Jr. source code in your own programs, but you 
  6.  * may not distribute the Writeswell Jr. word-processor code as a 
  7.  * commercial product.  If you modify the code, please do not call it 
  8.  * Writeswell Jr. (or Writeswell.)  This will ensure that people understand the 
  9.  * program and don’t have to deal with a number of different versions with 
  10.  * who-knows-what going on in the code.
  11.  * 
  12.  * Writeswell Jr. and Writeswell are trademarks of Working Software, Inc.
  13.  * Copyright ©1991 Working Software Inc.  All Rights Reserved.
  14.  * 18 Dec 91 Mike Crawford
  15.  */
  16.  
  17. #include <AppleEvents.h>
  18. #include "TBConstants.h"
  19. #include "TBGlobals.h"
  20. #include "AppEvents.h"
  21. #include "Gripe.h"
  22. #include "ObNull.h"
  23.  
  24. OSErr NullOAPPHandler( AppleEvent *theAppleEventPtr, AppleEvent *replyEventPtr, long refCon );
  25. OSErr NullQuitHandler( AppleEvent *theAppleEventPtr, AppleEvent *replyEventPtr, long refCon );
  26.  
  27. /* Hmm... This is almost object-oriented programming! */
  28.  
  29. OSErr DispatchNull( AEDesc *tokenPtr,
  30.                         AppleEvent *theAppleEventPtr,
  31.                         AppleEvent *replyEventPtr,
  32.                         long refCon )
  33. {
  34.     OSErr            err;
  35.     AEEventClass    theClass;
  36.     AEEventID        theID;
  37.     
  38.     /* This function is only for the Core suit.  Get the event ID from the appleEvent
  39.      */
  40.     
  41.     err = GetEventID( theAppleEventPtr, &theID );
  42.     
  43.     switch ( theID ){
  44.         default:
  45.             err = errAEEventNotHandled;
  46.             break;
  47.     }
  48.     
  49.     return noErr;
  50. }
  51.